[PWGHF] Add process function for EP resolution in charm polarisation task#14105
[PWGHF] Add process function for EP resolution in charm polarisation task#14105fgrosa merged 5 commits intoAliceO2Group:masterfrom
Conversation
|
O2 linter results: ❌ 0 errors, |
Please consider the following formatting changes to AliceO2Group#14105
| if constexpr (std::is_same_v<T, o2::framework::OutputObj<ZorroSummary>>) { | ||
| zorroSummary.setObject(zorro.getZorroSummary()); | ||
| } else { | ||
| LOGP(fatal, "No o2::framework::OutputObj<ZorroSummary> provided to HF event selection object in your task, add it if you want to get the normalisation from Zorro."); | ||
| } |
There was a problem hiding this comment.
To avoid having the ZorroSummary in the output of tasks that do not need it
There was a problem hiding this comment.
I don't see how this checks for the need of the OutputObj<ZorroSummary> member. From what I see, it just throws a fatal when an object of a wrong type is passed to init. If an unneeded OutputObj<ZorroSummary> member is passed, the condition evaluates to true.
There was a problem hiding this comment.
Hi, sorry to jump in, IMHO a cleaner solution would be to overload the init function with another one of the form void init(o2::framework::HistogramRegistry& registry) where the Zorro functionality is removed. I did not do it last time since all the tasks affected by the changes could in principle run on triggered data.
There was a problem hiding this comment.
I don't think another function is needed, if the Zorro object is taken as a pointer which is nullptr by default.
There was a problem hiding this comment.
But @fgrosa said he wants to avoid unneeded Zorro output in the tasks. I don't see how any of these changes achieve that.
There was a problem hiding this comment.
Both passing a pointer or overload the init function would work in my opinion. The fatal is in my opinion needed because if the OutputObj<ZorroSummary> is not passed, but the configurables are set to require a trigger mask, it would break otherwise.
…task (AliceO2Group#14105) Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
…task (AliceO2Group#14105) Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
…task (AliceO2Group#14105) Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
…task (AliceO2Group#14105) Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
@Mingze129 this PR adds the possibility to compute the EP resolution in the charm polarisation task (separate process function)